package factory.abstracts;

/**
 * 客户端代码
 *
 * @author ycc
 * @date 2024/4/1
 */
public class Client {
    public static void main(String[] args) {
        Factory factory1 = new ConcreteFactory1();
        Product product1 = factory1.createProduct();
        product1.show(); // 输出 "ConcreteProduct1"

        Factory factory2 = new ConcreteFactory2();
        Product product2 = factory2.createProduct();
        product2.show(); // 输出 "ConcreteProduct2"
    }
}
